//package com.hhs.storage.controller;
//
//import com.hhs.storage.bean.ResponseInfo;
//import com.hhs.storage.util.FileUpload;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.stereotype.Controller;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestMethod;
//import org.springframework.web.bind.annotation.RequestParam;
//import org.springframework.web.bind.annotation.ResponseBody;
//import org.springframework.web.multipart.MultipartFile;
//
//import java.util.Map;
//
///**
// * @Auther: shadow
// * @Date: 2018/11/15 16:05
// * @Description:
// */
//@Controller
//@RequestMapping("upload")
//@Slf4j
//public class UploadController {
//
//    @Value("${upload.folderName}")
//    private String folderName;
//
//    @RequestMapping(value = "/upload",method = RequestMethod.POST)
//    @ResponseBody
//    public Map<String, Object> upload(
//                               @RequestParam(value = "file",required = false) MultipartFile file) throws Exception {
//        String filename = FileUpload.writeUploadFile(file,folderName,"photo");
//        return ResponseInfo.success(null);
//
//    }
//}
